package org.altervista.cp.microkernel.install;

import java.sql.Blob;
import java.util.Date;

public class InstallRegistry {

	public static final int INSTALLED = 0;
	public static final int UNINSTALLED = 1;
	public static final int INSTALLATION_FAILURE = 2;
	public static final int UNINSTALLATION_FAILURE = 3;

	public InstallRegistry() {
	}

	public InstallRegistry(Installer installer) {
		_name = installer.getName();
		_version = installer.getMajorVersion() + "."
				+ installer.getMinorVersion();
	}

	public Number getId() {
		return _pk_id;
	}

	public void setId(Number id) {
		_pk_id = id;
	}

	public String getName() {
		return _name;
	}

	public void setName(String name) {
		_name = name;
	}

	public String getVersion() {
		return _version;
	}

	public void setVersion(String version) {
		_version = version;
	}

	public Date getStartInstallationDate() {
		return _startInstallationDate;
	}

	public void setStartInstallationDate(Date startInstallationDate) {
		_startInstallationDate = startInstallationDate;
	}

	public Date getStartUninstallationDate() {
		return _startUninstallationDate;
	}

	public void setStartUninstallationDate(Date startUninstallationDate) {
		_startUninstallationDate = startUninstallationDate;
	}

	public Date getEndInstallationDate() {
		return _endInstallationDate;
	}

	public void setEndInstallationDate(Date endInstallationDate) {
		_endInstallationDate = endInstallationDate;
	}

	public Date getEndUninstallationDate() {
		return _endUninstallationDate;
	}

	public void setEndUninstallationDate(Date endUninstallationDate) {
		_endUninstallationDate = endUninstallationDate;
	}

	public Number getStatus() {
		return _status;
	}

	public void setStatus(Number status) {
		_status = status;
	}

	public Blob getInstaller() {
		return _installer;
	}

	public void setInstaller(Blob installer) {
		_installer = installer;
	}

	private Number _pk_id;
	private String _name;
	private String _version;
	private Date _startInstallationDate;
	private Date _endInstallationDate;
	private Date _startUninstallationDate;
	private Date _endUninstallationDate;
	private Number _status;
	private Blob _installer;

}
